package com.onlinepay.exception;


import com.onlinepay.enums.ScoinPayEnum;

/**
 * User: shell.wang
 * Date: 2014-09-11
 * Time: 14:21:01
 * ScoinPay专用报错，code为报错代码，message为描述
 */
public class ScoinPayException extends Exception {

    private int code;

    public ScoinPayException() {
    }

    public ScoinPayException(String message) {
        super(message);
    }

    public ScoinPayException(int code, String message) {
        super(message);
        this.code = code;
    }

    public ScoinPayException(ScoinPayEnum scoinPayEnum){
        super(scoinPayEnum.getMessage());
        this.code = scoinPayEnum.getCode();
    }


    public ScoinPayException(String message, Throwable cause) {
        super(message, cause);
    }

    public ScoinPayException(Throwable cause) {
        super(cause);
    }

    public int getCode() {
        return code;
    }
}
